package com.example.myapplication.adp;

import androidx.annotation.NonNull;
import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentManager;
import androidx.fragment.app.FragmentPagerAdapter;

import com.example.myapplication.BaseFgm;

import java.util.ArrayList;

public class FragmentPagerAdp extends FragmentPagerAdapter {
    private ArrayList<BaseFgm> fragments=new ArrayList<>();

    public FragmentPagerAdp(@NonNull FragmentManager fm,ArrayList<BaseFgm> fragments) {
        super(fm);
        this.fragments=fragments;
    }

    @NonNull
    @Override
    public Fragment getItem(int position) {
        return fragments.get(position);
    }


    @Override
    public int getCount() {
        return fragments.size();
    }
}
